package com.test.service;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
	
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        CMS_TestDao userDao = (CMS_TestDao)context.getBean("userDao");
        System.out.println(userDao.countAll());
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        CMS_Test cms = new CMS_Test();
        cms.setEnd_time(new Date());
        System.out.println(userDao.getCMSEndTimeResults(cms));
        cms.setId(1l);
        cms.setCms_id(321l);
        userDao.update(cms);
	}

}
